/*
 * @Author: your name
 * @Date: 2019-11-28 17:46:20
 * @LastEditTime: 2019-11-28 18:33:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \web\avue-cli\src\api\sysSetup\laboratory.js
 */
import request from "@/router/axios";
import qs from "qs";
/**
 * @description: 仓库条件分页查询
 * @param {object}
 * @return: promise
 */
export const getWarehouseList = (data = {}) =>
  request({
    url: "/warehouse/v1/pageQuery",
    method: "post",
    data: qs.stringify(data)
  });

/**
 * @description: 仓库列表项修改
 * @param {object}
 * @return: promise
 */
export const updateWarehouse = (data = {}) =>
  request({
    url: "/warehouse/v1/update",
    method: "post",
    data: qs.stringify(data)
  });

/**
 * @description: 仓库新增
 * @param {object}
 * @return: promise
 */
export const addWarehouse = (data = {}) =>
  request({
    url: "/warehouse/v1/insert",
    method: "post",
    data: qs.stringify(data)
  });

/**
 * @description: 仓库列表项删除
 * @param {object}
 * @return: promise
 */
export const deleteWarehouse = (data = {}) =>
  request({
    url: "/warehouse/v1/getById",
    method: "post",
    data: qs.stringify(data)
  });


/**
 * @description: 仓库类型列表
 * @param {object}
 * @return: promise
 */
export const getWarehouseTypes = (data = {}) =>
  request({
    url: "/warehouseType/v1/seleteAll",
    method: "post",
    data: qs.stringify(data)
  });
// 仓库列表
export const getWarehouse = (data = {}) =>
  request({
    url: "/warehouse/v1/findAll",
    method: "post",
    data: qs.stringify(data)
  });

/**
 * @description: 负责人列表
 * @param {object}
 * @return: promise
 */
export const getUserInfo = (data = {}) =>
  request({
    url: "/userInfo/v1/selectManage",
    method: "post",
    data: qs.stringify(data)
  });

export const getWarehouseTypeTypeList = (data) => request({
    url: "/warehouseType/v1/pageQuery",
    method: "post",
    data: qs.stringify(data)
});
export const updateWarehouseType = (data) => request({
    url: "/warehouseType/v1/update",
    method: "post",
    data: qs.stringify(data)
});
export const addWarehouseType = (data) => request({
    url: "/warehouseType/v1/insert",
    method: "post",
    data: qs.stringify(data)
});
export const deleteWarehouseType = (data) => request({
    url: "/warehouseType/v1/getById",
    method: "post",
    data: qs.stringify(data)
});
